﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Pay.TO;

namespace Pay.DTO {
	/// <summary>
	/// 网关支付请求报文
	/// </summary>
	[JsonObject(MemberSerialization.OptOut)]
	public class gateway_pay_model : head_req {
		public gateway_pay_model() {
			binds = new List<bind_merchant_item>();
		}
		/// <summary>
		/// 分润分配集合，可空
		/// </summary>
		public List<bind_merchant_item> binds { get; set; }
		/// <summary>
		/// 订单号，对外参数
		/// </summary>
		public string order_no { get; set; }
		/// <summary>
		/// 交易金额:单位：分，对外参数
		/// </summary>
		public string tran_amount { get; set; }
		/// <summary>
		/// 银行简码，对外参数
		/// </summary>
		public string bank_code { get; set; }
		/// <summary>
		/// 结算TO/T1
		/// </summary>
		public string settle_type { get; set; }
		/// <summary>
		/// 支付后服务器回调该地址，对外参数
		/// </summary>
		public string notify { get; set; }
		/// <summary>
		/// 通道，对外参数
		/// </summary>
		public PayChannel pay_channel { get; set; }

		/// <summary>
		/// 支付方式：默认GATEWAY
		/// </summary>
		[JsonIgnore]
		public string pay_code { get { return "GATEWAY"; } }
		/// <summary>
		/// 支付类型：默认Gateway
		/// </summary>
		[JsonIgnore]
		public PayType pay_type { get { return PayType.Gateway; } }
		/// <summary>
		/// 通道交易流水号
		/// </summary>
		[JsonIgnore]
		public string transaction_no { get; set; }
		/// <summary>
		/// 银行简码，对外参数
		/// </summary>
		[JsonIgnore]
		public string bank_name { get; set; }
	}

	/// <summary>
	/// 网关支付响应报文
	/// </summary>
	public class gateway_pay_result : ApiResultMessage {
		/// <summary>
		/// 订单号
		/// </summary>
		public string order_no { get; set; }
		/// <summary>
		/// 请求url，商户用来跳转到网关页面的url
		/// </summary>
		public string request_url { get; set; }
	}
}
